import request from '../utils/request'

// 获取全部商品分类
export const Category = () => {
  return request({
    url: '/home/category/head'
  })
}

/**
 * 获取广告区轮播图
 * @returns Promise
 */
export const findBanner = () => {
  return request({
    url: '/home/banner'
  })
}

/**
 * 首页-新鲜好物
 * @returns Promise
 */
export const findhotshop = () => {
  return request({
    url: '/home/new'
  })
}

/**
 * 首页-人气推荐
 * @returns Promise
 */
export const findhotpeoples = () => {
  return request({
    url: '/home/hot'
  })
}

/**
 * 首页-热门品牌
 * @returns Promise
 */
export const findhotbarnd = () => {
  return request({
    url: '/home/brand'
  })
}

/**
 * 一级类目-PC
 */
export const category = (id) => {
  return request({
    url: '/category',
    params: {
      id
    }
  })
}
